Home:ALL Converter>How to perform a "NOT IN" query in mongodb without using $nin?

How to perform a "NOT IN" query in mongodb without using $nin?

Ask Time:2017-01-03T13:26:36         Author:oblivion

Json Formatter

I need an alternative to $nin in mongodb. As we know, we can achieve the "IN" query operation by performing "OR" query as well.

In the same way, how can I achieve "NOT IN" functionality in mongodb without using $nin ? What are the alternatives to using $nin in mongodb to acheive exactly same results ?

Author:oblivion,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/41436937/how-to-perform-a-not-in-query-in-mongodb-without-using-nin
oblivion :

I found that there is a operator $nor which exactly does this function. It works as the negation of $or.",
2017-01-03T10:17:16
yy